﻿define(['plugins/router', 'durandal/app','knockout','common/global'], function (router, app,ko,global) {
	var selectedLang=ko.observable();
	selectedLang.subscribe(function (lang) {
		global.currentLanguage=lang;
	});
	
    return {
        router: router,
        selectedLang:selectedLang,
        activate: function () {
            router.map([
                { route: ['','home'], title:'Welcome', moduleId: 'viewmodels/home', nav: true },
                { route: 'register',title:'Register', moduleId: 'viewmodels/register', nav: true },
                { route: 'number',title:'Number', moduleId: 'viewmodels/number', nav: true },
                { route: 'list',title:'List', moduleId: 'viewmodels/list', nav: true }
            ]).buildNavigationModel();
            return router.activate();
        }
    };
});